#!/bin/sh
    #
    # chkconfig: 345 80 20  
    # description: Memcached Application   
    # processname: qpmemcached
    # user: root

    # Script de Incio de las entidades de memcached 
    #

    # Source function library.
    . /etc/rc.d/init.d/functions

    INIT_PORT=11211
    DEFAULT_INSTANCES=1
    COUNT=1
    while [ $COUNT -le $DEFAULT_INSTANCES  ]
    do
      #echo "Corriendo la instancia numero $INIT_PORT"
      /opt/memcached/bin/memcached -u nobody -d -m 6144 -l 10.10.50.249 -p $INIT_PORT -c 8500  -R 200
      ((INIT_PORT++))
      ((COUNT++))
    done

